﻿@model List<CMP.ERP.Model.WareHose>
@{
    Layout = null;
}
@Html.Action("Account_Show", "Account");
    <div class="content">
        <div class="right" id="mainFrame"> 
    <div class="header">
        <div class="header-right">
            @using (Html.BeginForm("calendar_Add", "calendar", FormMethod.Post, new { enctype = "multipart/form-data" }))
            {
                <div id="modal-container-973559" class="modal hide fade" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="width:400px; margin-left:-150px;">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                        <h3 id="myModalLabel">
                            仓库新增系统
                        </h3>
                    </div>
                    <div class="modal-body">
                        <table class="table table-hover table-bordered " style="width:400px;text-align:center;margin:0 auto;border:2px solid #428bca;">
                            <tbody>
                                <tr>
                                    <td>仓库名称:</td>
                                    <td><input type="text" name="WareHose_Name" required /></td>
                                </tr>
                                <tr>
                                    <td>地址</td>
                                    <td><input type="text" name="WareHose_Address" required /></td>
                                </tr>
                                <tr>
                                    <td>联系人</td>
                                    <td><input type="text" name="WareHose_People" /></td>
                                </tr>
                                <tr>
                                    <td>手机</td>
                                    <td>
                                        <input type="text" name="WareHose_Phone" required />
                                    </td>
                                </tr>
                                <tr>
                                    <td>仓库图片:</td>
                                    <td><input type="file" name="images" required /></td>
                                </tr>
                                <tr>
                                    <td>备注</td>
                                    <td><textarea id="TextArea1" rows="2" cols="20" name="WareHose_Remark" required></textarea></td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="modal-footer">
                        <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button> <button type="submit" class="btn btn-default"><span class="icon-inbox"></span>保存</button>
                    </div>
                </div>
            }
        </div>
    </div>
    <!-- 顶部 -->

    <div id="middle">
        <div class="Switch"></div>
        <script type="text/javascript">
            $(document).ready(function (e) {
                $(".Switch").click(function () {
                    $(".left").toggle();

                });
            });
        </script>
        <div class="right" id="mainFrame">
            <div class="right_cont">
                <ul class="breadcrumb">
                    当前位置：
                    <a href="/Home/Index">首页</a>
                    <span class="divider">/</span>
                    仓库
                </ul>
                <div class="title_right"><strong>仓库管理</strong></div>
                <div style="width:100%; margin:auto">
                    <div style="margin-top:10px">
                        <form method="get" action="/calendar/calendar_Get">
                            <table>
                                <tr>
                                    <td>仓库名称:</td>
                                    <td><input type="text" name="WareHose_Name"  placeholder="根据名称查询" /></td>
                                    <td><button type="submit" class="btn btn-default" style="margin-bottom:10px"><span class="icon-search"></span>查询 </button></td>
                                    <td><button id="modal-973559" href="#modal-container-973559" role="button" type="button" class="btn btn-default" data-toggle="modal" style="margin-bottom:10px"><span class="icon-plus"></span>新增</button></td>
                                </tr>
                            </table>
                        </form>
                    </div>
                    <div style="margin-top:20px;">
                        <table class="table  table-hover table-bordered table-striped">
                            <thead>
                                <tr>
                                    <th>仓库编码</th>
                                    <th>仓库图片</th>
                                    <th>仓库名称</th>
                                    <th>地址</th>
                                    <th>联系人</th>
                                    <th>手机</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody>
                                @foreach (var item in Model)
                                {
                                    <tr>
                                        <td>@item.WareHose_Id</td>
                                        <td><img src="@item.Commodity_Url" style="width:45px; height:30px; border-radius:15px;" alt="仓库图像" /></td>
                                        <td>@item.WareHose_Name</td>
                                        <td>@item.WareHose_Address</td>
                                        <td>@item.WareHose_People</td>
                                        <td>@item.WareHose_Phone</td>
                                        <td>
                                            <a href="/calendar/calendar_Upd/@item.WareHose_Id">修改</a>
                                            |
                                            @if (@item.Num > 0)
                                            {
                                                <span>该仓库下有商品</span>
                                            }
                                            else
                                            {
                                                <a href="/calendar/calendar_Del/@item.WareHose_Id" onclick="return confirm('真的要删除吗?')">删除</a>
                                            }
                                        </td>
                                    </tr>
                                }
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
        </div>
    </div>


